QuickTime Movie File Format Specification, May 1996
| Previous | Chapter contents | Chapter top | Next |
Time-to-sample atoms store duration information for a media's samples, providing a mapping from a time in the media to the corresponding data sample. The time-to-sample atom has an atom type of 'stts' .
You can determine the appropriate sample for any time in a media by examining the time-to-sample atom table, which is contained in a time-to-sample atom.
Figure 0-31 shows the layout of a time-to-sample atom.
Figure 31 The layout of a time-to-sample atom
The time-to-sample atom contains the following data elements.
Figure 32 The layout of a time-to-sample table
You define a time-to-sample table by specifying these entries:
Entries in the table describe samples according to their order in the media and their duration. If consecutive samples have the same duration, a single table entry may be used to define more than one sample. In these cases, the count field indicates the number of consecutive samples that have the same duration. For example, if a video media has a constant frame rate, this table would have one entry and the count would be equal to the number of samples.
Figure 0-33 presents an example of a time-to-sample table that is based on the chunked media data shown in Figure 0-28 . That data stream contains a total of nine samples that correspond in count and duration to the entries in the table shown here. Even though samples 4, 5, and 6 are in the same chunk, sample 4 has a duration of 3, and samples 5 and 6 have a duration of 2.
Figure 33 An example of a time-to-sample table
| Previous | Chapter contents | Chapter top | Next |